import request from '@/utils/request'

export function addDepartment(data) {
  return request({
    url: '/juanbusiness/org-department/add',
    method: 'post',
    data
  })
}

export function findDepartment(page,size,id,name) {
  return request({
    url: '/juanbusiness/org-department/findPage',
    method: 'get',
    params: {page: page,size: size,id: id, name: name}
  })
}

  export function detailDepartment(id) {
    return request({
      url: '/juanbusiness/org-department/get',
      method: 'get',
      params: {id: id}
    })
  }

export function editDepartment(data) {
  return request({
    url: '/juanbusiness/org-department/edit',
    method: 'put',
    data
  })
}

export function delDepartment(id) {
  return request({
    url: '/juanbusiness/org-department/del',
    method: 'delete',
    params: {id: id}
  })
}
